[QUIZ] Test your understanding of SQL - Part 7
- Question 1: What is the result of the following SQL statement?
SELECT COUNT(DISTINCT STUDENT_ID) FROM EXAM_RESULTS;
- 3
- 4
- 5
- 6
-
- Question 2: Which SQL statement is used to calculate the average test score for the 1st test?
- SELECT AVG (DIEM_KT) FROM KETQUA_KIEMTRA;
- SELECT AVG (DIEM_KT) FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 1;
- SELECT AVG (DIEM_KT) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
- SELECT COUNT (DIEM_KT) FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 1;
-
- Question 3: Which SQL statement is used to calculate each test how many students have done?
- SELECT COUNT (DISTINCT ID_SV) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
- SELECT ID_BAIKT, MAX (ID_SV) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
- SELECT ID_BAIKT, COUNT (DISTINCT ID_SV) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
- SELECT ID_BAIKT, MIN (ID_SV) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
-
- Question 4: Which SQL statement is used to print out the record of all students who start with 'L'?
- SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV LIKE 'L%';
- SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV LIKE 'L';
- SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV = 'L';
- SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV <> 'L';
-
- Question 5: What is the result of the following SQL statement?
SELECT MAX(DIEM_KT) FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 1 AND HO_SV LIKE '%U%';
- 95
- 85
- 100
- 78
-
- Question 6: Which SQL statement is used to print out the records of all students whose first or last name ends with 'N'?
- SELECT * FROM KETQUA_KIEMTRA WHERE TEN_SV LIKE '% N' OR HO_SV LIKE '% N';
- SELECT * FROM KETQUA_KIEMTRA WHERE TEN_SV LIKE 'N' OR HO_SV LIKE 'N';
- SELECT * FROM KETQUA_KIEMTRA WHERE TEN_SV LIKE 'N%' OR HO_SV LIKE 'N%';
- SELECT * FROM KETQUA_KIEMTRA WHERE TEN_SV LIKE '% N%' OR HO_SV LIKE '% N%';
-
- Question 7: Which SQL statement is used to find the names of all students who score higher than 90 on the 2nd test?
- SELECT TEN_SV, HO_SV FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 2 OR DIEM_KT> 90;
- SELECT TEN_SV, HO_SV FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 2 AND DIEM_KT> 90;
- SELECT TEN_SV, HO_SV FROM KETQUA_KIEMTRA WHERE DIEM_KT> 90;
- SELECT TEN_SV, HO_SV FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 2 HAVING DIEM_KT> 90;
-
- Question 8: Which SQL statement is used to find the names of all students who scored a total of 2 tests higher than 180?
- SELECT TEN_SV, HO_SV, SUM (DIEM_KT) FROM KETQUA_KIEMTRA GROUP BY TEN_SV, HO_SV;
- SELECT TEN_SV, HO_SV, SUM (DIEM_KT) FROM KETQUA_KIEMTRA HAVING SUM (DIEM_KT)> 180;
- SELECT TEN_SV, HO_SV, SUM (DIEM_KT) FROM KETQUA_KIEMTRA GROUP BY TEN_SV, HO_SV HAVING SUM (DIEM_KT)> 180;
- SELECT TEN_SV, HO_SV, SUM (DIEM_KT) FROM KETQUA_KIEMTRA WHERE DIEM_KT> 180 GROUP BY TEN_SV, HO_SV;
-
- Question 9: How many records have the following SQL statement generated?
SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV LIKE '%U%' AND DIEM_KT > 75;
- 3
- 4
- 5
- There is no answer
-
- Question 10: How many records do the following SQL statements return?
SELECT * FROM KETQUA_KIEMTRA WHERE ID_SV <= 12 AND DIEM > 85;
- 5
- 4
- 3
- 2
-
3.5 ★ | 2 Vote
You should read it
- [QUIZ] Test your understanding of SQL - Part 5
- [QUIZ] Test your understanding of SQL - Part 1
- [QUIZ] Test your understanding of SQL - Part 6
- [QUIZ] Check your understanding of SQL - Part 2
- Test about database security P8
- What do you know about NoSQL Database?
- eQuiz - Multiple choice test on SQL
- Test about database security P12
May be interested
- Multiple choice quiz about Python - Part 10following the previous test, part 10 returned with the python function. let's try with quantrimang to try the 10 questions below.
- eQuiz - Quiz on Core Java - Part 1in the quiz below, you will be able to challenge the most basic questions related to core java - one of the most popular programming languages today.
- Excel computer test - Part 3after the second part of the excel test, the network administrator will continue to send you the 3rd part of the quiz series on this topic. let's work together to test your knowledge.
- eQuiz - Multiple choice test on PHP Practice - part 1in the quiz below, we will introduce you to part 1 of the test series of basic knowledge about php practive with 15 questions.
- Test your level of understanding of Office 2010 - Part 1in the article below, the network administrator will send you to read interesting quiz questions about office so you can assess your level of understanding about this software.
- eQuiz - Multiple choice test on programming language C - part 1this is part 1 of a series of tests on knowledge of c programming language, in total there will be 15 questions with no time for answering each sentence.
- The test has a Word answer - Part 7below is part 7 of the word quiz series. hopefully, these quizzes will help you partially test your knowledge for a long time.
- Multiple choice quiz about Python - Part 7following the previous test set, part 7 continues with the topic built-in functions in python. let's try with quantrimang to try the 10 questions below.
- Multiple choice quiz about Python - Part 5if you are interested in learning about the python programming language, the following quiz of network administrator will provide useful knowledge for your learning.
- Testing computer science knowledge, doing little for fun (part 2)the series of computer science quiz questions covers many areas with a set of 4 answers and answers at the bottom of the page. after part 1, network administrator continues to introduce part 2.